{% extends "base.html" %}
  {% block content %}
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h2 class="page-header">Jobs History</h2>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Jobs History
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="datatable-demo">
                                    <thead>
                                        <tr>
                                            <th>Jid</th>
                                            <th>Fun</th>
                                            <th>Arg</th>
                                            <th>StartTime</th>
                                            <th>Target</th>
                                            <th>User</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for jid,info in jids.items %}
                                        <tr class="even gradeC">
                                            <td><div class="tooltip-demo"><a href="/jobs/jobs_detail&{{ jid }}" data-toggle="tooltip" data-placement="left" title="jobs detail">{{ jid }}</a></div></td>
                                            <td>{{ info.Function }}</td>
                                            <td>{% for arg in info.Arguments %}
                                                 <li style="list-style-type:none">
                                                       {{ arg }}
                                                 </li>
                                                {% endfor %}
                                            </td>
                                            <td>{{ info.StartTime }}</td>
                                            <td style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">{{ info.Target }}</td>
                                            <td>{{ info.User }}</td>
                                        </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->                  
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
  {% endblock %}


  {% block jquery %}
     <script type="text/javascript">
     $(document).ready(function(){
         //data table
         $("#datatable-demo").DataTable( {
            //设置第一列为初始化排序的列
            "order": [[ 3, "desc" ]],
            });
         // end data table
     });
     </script>
  {% endblock %}
